/* 库存管理页面专用样式 */

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* 查询区域样式 */
.filter-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.4rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row .form-group {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}

.filter-row .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.filter-row .form-group input,
.filter-row .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-row .form-group input:focus,
.filter-row .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-row .form-group input::placeholder {
    color: #aaa;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #eaeaea;
}

.filter-actions .btn-primary,
.filter-actions .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

th, td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f5f7ff;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:nth-child(even):hover {
    background-color: #f0f2ff;
}

/* 可点击的物料编码样式 */
.sku-cell {
    cursor: pointer;
    color: #667eea;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.sku-cell:hover {
    color: #5a6fd8;
    background-color: #f0f5ff;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-content .form-group input,
.modal-content .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-content .btn-primary {
    width: 100%;
    margin-top: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-section {
        padding: 1rem;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-row .form-group {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn-primary,
    .filter-actions .btn-secondary {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .stat-card p {
        font-size: 1.2rem;
    }
}